#include "app_common.h"
#include <stdio.h>
#include "../app/app_message.h"

int main(int argc, char const *argv[])
{
    long time = app_common_getsystime();
    printf("%ld\n",time);

    char data[8] = {0x01,0x02,0x03,0x6e,0x6e,0x41,0x42,0x43};
    char *json = app_message_str2json(data,8);
    printf("%s\n",json);

    char *json1 = "{\"conn_type\":1,\"id\":\"6e6e\",\"msg\":\"41424344\"}";
    char buff[100];
    int len = app_message_json2str(json1,buff,100);
    for (size_t i = 0; i < len; i++)
    {
        printf("%02x",buff[i]);
        printf(" ");
    }
    
    return 0;
}
